calculation of fourier coefficient using fourier transform